<template>
  <div class="common-layout">
    <el-container>
      <el-header style="background-color: #4f463e">
        <img src="./assets/logo.png" style="height: 90%;border-radius: 10px"/>
        <el-button type="primary" style="float: right;margin-top: 15px">退出</el-button>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-row class="tac">
              <el-menu
                  default-active="1"
                  class="el-menu-vertical-demo"
              >
                <el-menu-item index="1" @click="router().push({ path:'/'})">
                  <el-icon><location /></el-icon>
                  <span>员工管理</span>
                </el-menu-item>
                <el-menu-item index="2" @click="router().push({ path:'/user'})">
                  <el-icon><StarFilled /></el-icon>
                  <span>顾客管理</span>
                </el-menu-item>
                <el-menu-item index="3" @click="router().push({ path:'/account'})">
                  <el-icon><document /></el-icon>
                  <span>记账</span>
                </el-menu-item>
                <el-menu-item index="4" @click="router().push({ path:'/about'})">
                  <el-icon><setting /></el-icon>
                  <span>关于我</span>
                </el-menu-item>
              </el-menu>
          </el-row>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>

import router from "@/router";

export default {
  name: 'App',
  methods: {
    router() {
      return router
    }
  },
  components: {
  }
}
</script>

<style>

</style>
